﻿@model sgp.Models.Doacao
@{
    ViewBag.Title = "Edit";
}
<h2>
    Edit</h2>
<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>
@using (Html.BeginForm())
{
    @Html.ValidationSummary(true)
    <fieldset>
        <legend>Editar Doacao</legend>
        <table border="0" width="35%" cellpadding="5">
            
            <tr>
                <td>
                    <div>
                        Data da Doação
                    </div>
                    <div>
                        @Html.TextBoxFor(model => model.Data, new { @class = "datepicker" })
                        @Html.ValidationMessageFor(model => model.Data)
                    </div>
                </td>
                <td>
                    <div>
                        Valor da Doação
                    </div>
                    <div>
                        @Html.TextBoxFor(model => model.Valor, new { @class = "textmed" })
                        @Html.ValidationMessageFor(model => model.Valor)
                    </div>
                </td>
            </tr>

            <tr>
                <td>
                    <div class="editor-field">
                        <br />
                        Tipo da Doação<br />
                        @Html.DropDownListFor(model => model.FormaDoacao.Id, new SelectList(ViewBag.FormasDoacao, "Id", "Nome"), "Selecione Tipo de Doador")
                    </div>
                </td>
            </tr>
            </table>

            <table border="0" width="10%" cellpadding="3">
                <tr>
                    <th>
                        <input class="btn btn-success btn-small" type="submit" value="Salvar" />
                    </th>
                    <th>
                        <a class="btn btn-inverse btn-small" href="/Doacao/Index" data-original-title="">
                            Voltar</a>
                    </th>
                </tr>
            </table>
    </fieldset>
}
